const rdata = require("../test/0809_3_frogman在雨林四排的多场地面移动路线.json");
const fs = require("fs-extra");
const path = require("path");

let trajectories = rdata.map(match => match.locations.map(e => {
  return {
    x: e.x,
    y: e.y
  }
}));
console.log("RAW轨迹数量", trajectories.length);
console.log("点的数量",(_=>{
  return trajectories.map(e=>e.length).reduce((a,b)=>a+b)
})())
fs.writeFile(path.join("F:\\vscode-projects\\traclus_impl\\RAW_PUBG", `0823_TRACLUS_FROGMAN.json`), JSON.stringify({
  "epsilon": 40, 
  "min_neighbors": 2, 
  "min_num_trajectories_in_cluster": 3, 
  "min_vertical_lines": 1, 
  "min_prev_dist": 1,
  "trajectories":trajectories
}),()=>{
  process.exit();
})

// debugger